Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>RUNCOM</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/RUNCOM"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-RUNCOM rootpage-RUNCOM skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">RUNCOM</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with the <a href="Run_command" title="Run command">Run command</a>.</div>
<p><b>RUNCOM</b> is a <a href="Compatible_Time_Sharing_System" class="mw-redirect" title="Compatible Time Sharing System">CTSS</a> <a href="Macro_(computer_science)" title="Macro (computer science)">macro</a> command (script) processor.<sup id="cite_ref-CTSSmanual1969_1-0" class="reference"><a href="#cite_note-CTSSmanual1969-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p><a href="Louis_Pouzin" title="Louis Pouzin">Louis Pouzin</a> created RUNCOM for CTSS circa 1963.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> He released a paper in 1965 describing a design for the <a href="Multics" title="Multics">Multics</a> shell which includes a brief description of RUNCOM<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> followed by a second paper he released five days later describing a design for RUNCOM that added commands for <a href="Control_flow" title="Control flow">control flow</a>, conditional branching and looping.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>In the context of Unix-like systems, the term <i>rc</i> stands for the phrase "<b>run commands</b>". It is used for any file that contains startup information for a command.
</p><p>From <a href="Brian_Kernighan" title="Brian Kernighan">Brian Kernighan</a> and <a href="Dennis_Ritchie" title="Dennis Ritchie">Dennis Ritchie</a>:<sup id="cite_ref-iu.edu_5-0" class="reference"><a href="#cite_note-iu.edu-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p>
<style data-mw-deduplicate="TemplateStyles:r1244412712">
/* start https://en.wikipedia.org/ */


.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}


/* end https://en.wikipedia.org/ */
</style><blockquote class="templatequote"><p>There was a facility that would execute a bunch of commands stored in a file; it was called runcom for "run commands", and the file began to be called "a runcom". rc in <a href="Unix" title="Unix">Unix</a> is a fossil from that usage.</p></blockquote>
<p><a href="Tom_Van_Vleck" title="Tom Van Vleck">Tom Van Vleck</a>, a <a href="Multics" title="Multics">Multics</a> engineer, has also reminisced about the extension rc: "The idea of having the command processing shell be an ordinary slave program came from the Multics design, and a predecessor program on CTSS by <a href="Louis_Pouzin" title="Louis Pouzin">Louis Pouzin</a> called RUNCOM, the source of the '.rc' suffix on some Unix configuration files."<sup id="cite_ref-urlUnix_and_Multics_7-0" class="reference"><a href="#cite_note-urlUnix_and_Multics-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p>This is also the origin of the name of the <a href="Plan_9_from_Bell_Labs" title="Plan 9 from Bell Labs">Plan 9 from Bell Labs</a> shell by <a href="Tom_Duff" title="Tom Duff">Tom Duff</a>, the <a href="Rc_shell" class="mw-redirect" title="Rc shell">rc shell</a>. It is called "rc" because the main job of a shell is to "run commands".
</p><p>While not historically precise, rc may also be expanded as "run control", because an rc file controls how a program runs. For instance, the editor <a href="Vim_(text_editor)" title="Vim (text editor)">Vim</a> looks for and reads the contents of the .vimrc file to determine its initial configuration. In <i><a href="The_Art_of_Unix_Programming" title="The Art of Unix Programming">The Art of Unix Programming</a></i>, <a href="Eric_S._Raymond" title="Eric S. Raymond">Eric S. Raymond</a> consistently refers to rc files as "run-control" files.
</p>
<div class="mw-heading mw-heading2"><h2 id="Usage">Usage</h2></div>
<p><b>Background</b>
</p><p>RUNCOM is not a shell in the sense of the UNIX shell. When a user type commands into CTSS they go to the supervisor (kernel), not any UNIX-shell-like program. Users cannot type commands into RUNCOM, it processes disk files. CTSS files have first name and a second name separated by spaces, e.g. FOO <a href="BCD_(character_encoding)" title="BCD (character encoding)">BCD</a>, similar to <a href="Conversational_Monitor_System" title="Conversational Monitor System">CMS</a>.
</p><p><b>Description of RUNCOM</b>
</p><p>RUNCOM command chains also known as macro-commands (both terms mean scripts) are files with a second name of either RUNCOM or BCD which contain zero or more lines. Lines in the script are either blank lines, comments, regular commands (the kind that could be entered on the supervisor's command line) or the pseudo-command (command built into RUNCOM only) CHAIN.
</p><p>Comments start with either <code>$</code> or <code>*</code> as the first character of the line. Comments using <code>$</code> are printed (including the <code>$</code>) when RUNCOM runs while ones with <code>*</code> are not printed at all. Parameter substitution does not occur in comments.
</p><p>When a user invoke RUNCOM, the arguments (parameters) to it must first start with the first name of the file containing the script. If a user invoke RUNCOM without any arguments it prints some instructions on how to use it and stops, returning the user to the supervisor's (system's) command line. The remaining arguments, if any, are either command names, values to be used as arguments in the script or the strings (NIL) or (END) including the parenthesis.
</p><p>In the script, CHAIN give names to arguments which were used on the command line when RUNCOM was called, e.g. putting CHAIN LALA FAFA in the script and invoking RUNCOM XYZZY 3 will cause LALA in the script to be substituted into a 3 when it is used in any lines that come after CHAIN while FAFA will remain FAFA as RUNCOM was invoked without specifying anything for it.
</p><p>If an argument to RUNCOM is (NIL), a positional parameter denoted as an argument to CHAIN in the script will be expand into nothing, e.g. CHAIN ALPHA BETA GAMMA combined with RUNCOM A (NIL) B will cause ALPHA to be substituted with A and GAMMA to B while BETA will be removed from any command that follows CHAIN in the script.
</p><p>If a RUNCOM argument is (END) the corresponding <code>CHAIN</code> argument will be treated as (NIL) and all subsequent arguments will also be treated as (NIL).
</p><p>Any parameter to <code>CHAIN</code> can be used as a command name in the script, i.e. can come first before any arguments. An example would be <code>RUNCOM SCRIPT LISTF</code> combined with <code>CHAIN CMD</code> followed by CMD at the start of a following line. CMD will be substituted into <code>LISTF</code> which will list the files in the directory (like the Unix <code>ls</code> command).
</p><p>Once the substitutions have been completed, RUNCOM sends the commands to the SCHAIN library subroutine which is available to other programs as well.<sup id="cite_ref-CTSSmanual1969_1-1" class="reference"><a href="#cite_note-CTSSmanual1969-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Configuration_file" title="Configuration file">Configuration file</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-CTSSmanual1969-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-CTSSmanual1969_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-CTSSmanual1969_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFGrisman1969" class="citation book cs1">Grisman, P.A., ed. (1969). <a rel="nofollow" class="external text" href="https://archive.org/details/bitsavers_mitctssCTSc69_26767392/page/n525/mode/2up?q=runcom"><i>The Compatible Time-Sharing System - A Programmer's Guide, 2nd Ed</i></a>. Boston: The MIT Press. p.&nbsp;525.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFPouzin2000" class="citation web cs1">Pouzin, Louis (25 November 2000). <a rel="nofollow" class="external text" href="http://multicians.org/shell.html">"The Origin of the Shell"</a>. <i>Multicians</i><span class="reference-accessdate">. Retrieved <span class="nowrap">31 July</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite id="CITEREFPouzin1965" class="citation report cs1"><a href="Louis_Pouzin" title="Louis Pouzin">Pouzin, Louis</a> (April 2, 1965). <a rel="nofollow" class="external text" href="https://people.csail.mit.edu/saltzer/Multics/Multics-Documents/MDN/MDN-4.pdf">The SHELL: A Global Tool for Calling and Chaining Procedures in the System</a> <span class="cs1-format">(PDF)</span> (Report). Massachusetts Project Institute of Technology Project MAC. MDN-4<span class="reference-accessdate">. Retrieved <span class="nowrap">April 9,</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFPouzin1965" class="citation report cs1"><a href="Louis_Pouzin" title="Louis Pouzin">Pouzin, Louis</a> (April 7, 1965). <a rel="nofollow" class="external text" href="https://people.csail.mit.edu/saltzer/Multics/Multics-Documents/MDN/MDN-5.pdf">RUNCOM - A Macro-Procedure Processor for the 636 System</a> <span class="cs1-format">(PDF)</span> (Report). Massachusetts Project Institute of Technology Project MAC. MDN-4<span class="reference-accessdate">. Retrieved <span class="nowrap">April 9,</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-iu.edu-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-iu.edu_5-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20100610011504/http://kb.iu.edu/data/abnd.html">"In Unix, what do some obscurely named commands stand for?"</a>. <i>IT Knowledge Base</i>. <a href="Indiana_University" title="Indiana University">Indiana University</a>. Archived from the original on 2010-06-10<span class="reference-accessdate">. Retrieved <span class="nowrap">2024-01-06</span></span>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite web}}</code>: CS1 maint: bot: original URL status unknown (link)</span></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text">
<a rel="nofollow" class="external free" href="https://www.oreilly.com/pub/au/2933">https://www.oreilly.com/pub/au/2933</a>
O'Reilly, Bio for Vicki Brown</span>
</li>
<li id="cite_note-urlUnix_and_Multics-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-urlUnix_and_Multics_7-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.multicians.org/unix.html">"Unix and Multics"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2009-04-20</span></span>.</cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-23" href="https://en.wikipedia.org/wiki/?title=RUNCOM&amp;oldid=1302116492">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>